<template>
  <el-dialog title="物流进度" :visible.sync="dialogVisible" width="46%">
    <el-form ref="formRef" :model="addForm" label-width="80px" :rules="formRules">
      <el-form-item label="省市区县" prop="address1">
        <el-input v-model="addForm.address1"></el-input>
      </el-form-item>
      <el-form-item label="详细地址" prop="address2">
        <el-input v-model="addForm.address2"></el-input>
      </el-form-item>
    </el-form>
    <!-- 底部区域 -->
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  data: function () {
    return {
      // 控制对话框显隐
      dialogVisible: false,
      addForm: {
        address1: '',
        address2: ''
      },
      formRules: {
        address1: [
          { required: true, message: '请选择省市区县', trigger: 'blur' }
        ],
        address2: [
          { required: true, message: '请填写详细信息', trigger: 'blur' }
        ]
      },
      progressInfo: []
    }
  },
  methods: {
    // 获取物流进度
    getProgress: async function () {
      const res = await this.$http.get('/kuaidi/1106975712662')
      if (res.meta.status !== 200) {
        return this.$message.warning('获取物流信息失败')
      }
      this.progressInfo = res.data
    }
  }
}
</script>
<style lang="less" scoped>
</style>
